﻿<Application x:Class="Hp.Vertica.Client.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:my="clr-namespace:Hp.Vertica.Client"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <my:BooleanConverter x:Key="myBooleanConverter"/>
        <my:BooleanReverserConverter x:Key="myBooleanReverserConverter"/>
        <my:BooleanToVisibilityConverter x:Key="myBooleanToVisibilityConverter"/>
        <!--<Style TargetType="Label">
            <Setter Property="Foreground" Value="#cccccc"/>
        </Style>
        <Style TargetType="TextBox">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Background" Value="#444444"/>
            <Setter Property="Foreground" Value="#cccccc"/>
        </Style>
        <Style TargetType="PasswordBox">
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Background" Value="#444444"/>
            <Setter Property="Foreground" Value="#cccccc"/>
        </Style>
        <Style TargetType="Button">
            <Setter Property="Background" Value="#22222222" />
            <Setter Property="BorderThickness" Value="0" />
            <Setter Property="Foreground" Value="#cccccccc"/>
        </Style>-->
        <!--DataContext = DatabaseContext-->
        <TreeViewItem x:Key="treeVerticaDatabase" x:Shared="false">
            <TreeViewItem.Header>
                <StackPanel Orientation="Horizontal">
                    <Image Source="Images/Icons/Light/appbar.database.png"/>
                    <Label Content="{Binding Path=Name}"/>
                </StackPanel>
            </TreeViewItem.Header>
            <TreeViewItem ItemsSource="{Binding Path=SystemTables}">
                <TreeViewItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="Images/Icons/Light/appbar.folder.png"/>
                        <Label>System Tables</Label>
                    </StackPanel>
                </TreeViewItem.Header>
            </TreeViewItem>
            <TreeViewItem ItemsSource="{Binding Path=Tables}">
                <TreeViewItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="Images/Icons/Light/appbar.folder.png"/>
                        <Label>Tables</Label>
                    </StackPanel>
                </TreeViewItem.Header>
            </TreeViewItem>
            <TreeViewItem ItemsSource="{Binding Path=Views}">
                <TreeViewItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <Image Source="Images/Icons/Light/appbar.folder.png"/>
                        <Label>Views</Label>
                    </StackPanel>
                </TreeViewItem.Header>
            </TreeViewItem>
        </TreeViewItem>
        <TreeViewItem x:Key="itemDatabase" x:Shared ="false" ItemsSource="{Binding Path=Categories}">
            <TreeViewItem.ItemTemplate>
                <DataTemplate>
                    <TreeViewItem ItemsSource="{Binding Path=Schemas}">
                        <TreeViewItem.Header>
                            <StackPanel Orientation="Horizontal">
                                <Image Source="Images/Icons/Light/appbar.folder.png" Height="25" />
                                <Label Content="{Binding Path=Name}"></Label>
                            </StackPanel>
                        </TreeViewItem.Header>
                        <TreeViewItem.ItemTemplate>
                            <ItemContainerTemplate>
                                <TreeViewItem ItemsSource="{Binding Path=Objects}">
                                    <TreeViewItem.Header>
                                        <StackPanel Orientation="Horizontal">
                                            <Image Source="Images/Icons/Light/appbar.folder.png" Height="25" />
                                            <Label Content="{Binding Path=Name}"/>
                                        </StackPanel>
                                    </TreeViewItem.Header>
                                    <TreeViewItem.ItemTemplate>
                                        <ItemContainerTemplate>
                                            <StackPanel Orientation="Horizontal">
                                                <Image Source="Images/Icons/Light/appbar.table.png" Height="25" />
                                                <Label Content="{Binding Path=Name}"></Label>
                                            </StackPanel>
                                        </ItemContainerTemplate>
                                    </TreeViewItem.ItemTemplate>
                                </TreeViewItem>
                            </ItemContainerTemplate>
                        </TreeViewItem.ItemTemplate>
                    </TreeViewItem>
                </DataTemplate>
            </TreeViewItem.ItemTemplate>
            <TreeViewItem.Header>
                <StackPanel Orientation="Horizontal">
                    <Image Source="Images/Icons/Light/appbar.database.png" Height="25" />
                    <Label Content="{Binding Path=FullName}"></Label>
                </StackPanel>
            </TreeViewItem.Header>
        </TreeViewItem>
        
    </Application.Resources>
</Application>
